import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei']  #设置绘图支持中文显示

height = [170,162,162,157,172,171,173,172,178,176,175,178,179,180,182,181,180]

bins = range(150,185,3)
plt.title('身高分布')
plt.hist(height,bins=bins)
plt.show()